package com.youtills.core.crypto;

/**
 * Created by IntelliJ IDEA.
 * User: ravi
 * Date: 8/29/12
 * Time: 11:36 AM
 * To change this template use File | Settings | File Templates.
 */
public class DigestFactory {

    public static IDigest getDigest(DigestType digestType){
        return getDigest(digestType, null);
    }
    public static IDigest getDigest(DigestType digestType, String salt){
        if(digestType != null){
            switch (digestType){
                case MD5:
                    return new MD5Digest(salt);
                case SHA1:
                    return new SHA1Digest(salt);
            }
        }
        return null;
    }

}
